package com.android.kotlincoroutinemvvmdemo
import android.opengl.GLSurfaceView
import android.os.Bundle
import com.android.kotlincoroutinemvvmdemo.base.BaseActivity
import com.android.kotlincoroutinemvvmdemo.databinding.ActivityTaskAffinityBinding
import com.android.kotlincoroutinemvvmdemo.shader.DotLineTriangleRenderer
import com.android.kotlincoroutinemvvmdemo.shader.RectangleRenderer
import com.android.kotlincoroutinemvvmdemo.shader.TriangleRenderer

class TaskAffinityActivity : BaseActivity<ActivityTaskAffinityBinding>() {

    override fun getLayoutId() = R.layout.activity_task_affinity

    override fun init(savedInstanceState: Bundle?) {

        mBinding.glSurfaceView.apply {
            //设置gl的版本
            setEGLContextClientVersion(3)
            setEGLConfigChooser(false)
            setRenderer(TriangleRenderer())
            //等待点击才会刷帧
            renderMode = GLSurfaceView.RENDERMODE_WHEN_DIRTY
        }

    }

    companion object {
        const val TAG = "TaskAffinityActivity"
    }

}